import request from '@/utils/request'
import { base, qss } from '../utils/request'

export const List = (userId, userName, phone, isActivation) => { return request.get(`${base}/user/listUser.json`, { params: { 'entity.userId': userId, 'entity.userName': userName, 'entity.phone': phone, 'entity.isActivation': isActivation }}) }

export const Merge = params => { return request.post(`${base}/user/merge.json`, qss(params)) }

export const MergeAccount = params => { return request.post(`${base}/account/merge.json`, qss(params)) }

export const Account = (userId) => { return request.get(`${base}/account/userId`, { params: { userId: userId }}) }

export const MergeWinner = params => { return request.post(`${base}/winner/merge.json`, qss(params)) }

export const initLevel = () => { return request.get(`${base}/level/initLevel.json`) }

export const initActivity = (activityId) => { return request.get(`${base}/activity/activityId`, { params: { activityId: activityId }}) }

export const getMyChildren = (userId) => { return request.get(`${base}/user/myChildren.json`, { params: { userId: userId }}) }

export const getMySuperior = (userId) => { return request.get(`${base}/user/mySuperior.json`, { params: { userId: userId }}) }
